#ifndef RENDER_OBJECT_H_INCLUDED
#define RENDER_OBJECT_H_INCLUDED

class render_engine;
class render_object : public _render_attribs
{
    public:


    render_engine*  re;
    html_tag*       tag;

    SDL_Rect        position;
    int             ww_startx; // if we wrap text the start pos for ww

    unsigned long   h;
    SDL_Surface*    img;


    SDL_Rect        box;


    // flags for mouse state
    bool            mouse_over;

    // object render loop
    void render(SDL_Event*);


    render_object(render_engine* _re, html_tag* _t) :
        re(_re), tag(_t), ww_startx(0), h(_t->tag_hash), img(0),
        mouse_over(false)
    {
        position.x = position.y = position.h = position.w = 0;
        box.x = 0;
        box.y = 0;
        box.h = 0;
        box.w = 0;
    };
};

#endif // RENDER_OBJECT_H_INCLUDED
